import { defineConfig } from 'rspress/config'

export default defineConfig({
    root: 'docs',
    title: '@Lynn/react-hooks',
    description: 'Custom React Hooks Library',
    route: {
        exclude: ['src/**/*'],
        include: ['docs/**/*']
    },
    lang: 'zh',
    themeConfig: {
        locales: [
            {
                lang: 'en',
                outlineTitle: 'ON THIS Page',
                label: 'English'
            },
            {
                lang: 'zh',
                outlineTitle: '大纲',
                label: '简体中文'
            }
        ],
        nav: [],
        sidebar: {
            '/': [
                {
                    text: '开始',
                    items: [
                        // 填入一个对象
                        {
                            text: 'introduction',
                            link: '/guide/introduction'
                        },
                        {
                            text: 'gettingStarted',
                            link: '/guide/getting-started'
                        }
                    ]
                },
                {
                    text: 'apiOverview',
                    items: [
                        // 直接填入链接字符串
                        {
                            text: 'overview',
                            link: '/api/overview'
                        },
                        '/api/use-boolean/use-boolean',
                        '/api/use-count/use-count'
                    ]
                }
            ],
            '/en/': [
                {
                    text: 'Getting Started',
                    items: [
                        // 填入一个对象
                        {
                            text: 'introduction',
                            link: '/en/guide/introduction'
                        },
                        {
                            text: 'gettingStarted',
                            link: '/en/guide/getting-started'
                        }
                    ]
                },
                {
                    text: 'apiOverview',
                    items: [
                        // 直接填入链接字符串
                        {
                            text: 'overview',
                            link: '/en/api/overview'
                        },
                        '/en/api/use-count/use-count'
                    ]
                }
            ]
        },
        outlineTitle: '目录',
        prevPageText: '上一页',
        nextPageText: '下一页',
        footer: {
            message: '<p>所有解释权归 <strong>@Lynn</strong> 所有</p>，仅供参考学习，请勿用于商业用途。'
        },
        socialLinks: [
            {
                icon: 'github',
                mode: 'link',
                content: 'https://gitee.com/web-script'
            }
        ]
    }
})
